implementation group: 'javax.servlet', name: 'jstl', version: '1.2'
implementation group: 'taglibs', name: 'standard', version: '1.1.2'
implementation group: 'commons-codec', name: 'commons-codec', version: '1.13'
- implementation files('libs/sms.jar')
+ implementation files('libs/masmgc.sdk.sms-0.0.1-SNAPSHOT.jar')
// implementation files('libs/ojdbc6.jar')
implementation 'commons-dbcp:commons-dbcp:1.4'
implementation 'commons-beanutils:commons-beanutils:1.9.3'
+ implementation 'log4j:log4j:1.2.17'
+ implementation 'com.alibaba:fastjson:1.2.60'
+
implementation project(':payapi-common')
/*支付宝SDK*/
implementation group: 'com.alipay.sdk', name: 'alipay-sdk-java', version: '3.7.110.ALL'
import com.supwisdom.dlpay.agent.service.AlipayService
import com.supwisdom.dlpay.agent.service.WechatService
import com.supwisdom.dlpay.framework.tenant.TenantContext
+import org.dom4j.Element
import org.dom4j.io.SAXReader
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
// 得到xml根元素
val root = document.rootElement
// 得到根元素的所有子节点
- val elementList = root.elements()
+ val elementList = root.elements() as MutableList<Element>
// 遍历所有子节点
for (e in elementList) {
map[e.name] = e.text
val code = RandomUtils.randomNumber(6)
logger.error { code }
//TODO 先发送成功,再放入redis
- redisTemplate.opsForValue().set(phone, code, Duration.ofMinutes(5))
val rs = mobileApiService.sendSms(phone, code)
if ("0" != rs.retcode) {
return JsonResult.error(rs.retmsg)
}
+ redisTemplate.opsForValue().set(phone, code, Duration.ofMinutes(5))
}
return JsonResult.ok("验证码已发送")
}
import mu.KotlinLogging
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service
+import org.springframework.util.Base64Utils
import java.util.*
@Service
return resp
}
var addserial = systemUtilService.getBusinessValue("sms.addserial")
- if (pwd.isNullOrEmpty()) {
- resp.retcode = "1"
- resp.retmsg = "短信业务参数未配置"
- logger.error { "短信参数:sms.addserial 未在业务表中配置" }
- return resp
+ if (addserial.isNullOrEmpty()) {
+ addserial=""
}
var sign = systemUtilService.getBusinessValue("sms.sign")
if (sign.isNullOrEmpty()) {