Showing
24 changed files
with
267 additions
and
34 deletions
... | @@ -279,7 +279,6 @@ | ... | @@ -279,7 +279,6 @@ |
279 | <plugin> | 279 | <plugin> |
280 | <artifactId>maven-war-plugin</artifactId> | 280 | <artifactId>maven-war-plugin</artifactId> |
281 | <configuration> | 281 | <configuration> |
282 | - <version>2.5</version> | ||
283 | <webXml>src\main\webapp\WEB-INF\web.xml</webXml> | 282 | <webXml>src\main\webapp\WEB-INF\web.xml</webXml> |
284 | </configuration> | 283 | </configuration> |
285 | </plugin> | 284 | </plugin> | ... | ... |
... | @@ -52,7 +52,7 @@ public class UserKitingAction { | ... | @@ -52,7 +52,7 @@ public class UserKitingAction { |
52 | clientName = "*" + clientName.substring(1); | 52 | clientName = "*" + clientName.substring(1); |
53 | bank.put("CLIENT_NAME", clientName); | 53 | bank.put("CLIENT_NAME", clientName); |
54 | model.addAttribute("bank", bank); | 54 | model.addAttribute("bank", bank); |
55 | - model.addAttribute("balance", fundBiz.balance(userId)); | 55 | + model.addAttribute("balance", fundBiz.balanceSelf(userId)); |
56 | 56 | ||
57 | if (StringUtil.isBlank(params.get("_limit"))) { | 57 | if (StringUtil.isBlank(params.get("_limit"))) { |
58 | params.put("_limit", 10); | 58 | params.put("_limit", 10); | ... | ... |
... | @@ -38,7 +38,7 @@ public class PositionAction { | ... | @@ -38,7 +38,7 @@ public class PositionAction { |
38 | /**持仓列表*/ | 38 | /**持仓列表*/ |
39 | @RequestMapping("position") | 39 | @RequestMapping("position") |
40 | public String position(Model model) { | 40 | public String position(Model model) { |
41 | - T2Result result = positionBiz.position(ActionUtil.getUser()); | 41 | + T2Result result = positionBiz.positionSelf(ActionUtil.getUser()); |
42 | model.addAttribute("positions", result.getData()); | 42 | model.addAttribute("positions", result.getData()); |
43 | return "user/pick/position.jsp"; | 43 | return "user/pick/position.jsp"; |
44 | } | 44 | } | ... | ... |
... | @@ -38,6 +38,23 @@ public class CommonBiz { | ... | @@ -38,6 +38,23 @@ public class CommonBiz { |
38 | @Value("${${env}.pnr.pbKey}") | 38 | @Value("${${env}.pnr.pbKey}") |
39 | private String pbKey; | 39 | private String pbKey; |
40 | 40 | ||
41 | + public boolean checkTime(boolean checkDate, int beginTimeId, int endTimeId) { if (checkDate) { | ||
42 | + Map params = new HashMap(); | ||
43 | + params.put("function_id", "619824"); | ||
44 | + T2Result queryResult = T2Util.request(params, "619824"); | ||
45 | + if ("0".equals(((Map)queryResult.getData().get(0)).get("business_flag"))) { | ||
46 | + return false; | ||
47 | + } | ||
48 | + } | ||
49 | + | ||
50 | + int nowtime = Integer.parseInt(DateUtil.getNow(DateEnum.UNSIGNED_TIME)); | ||
51 | + String beginTime = this.sysParamValue.getValueById(beginTimeId); | ||
52 | + String endTime = this.sysParamValue.getValueById(endTimeId); | ||
53 | + boolean flag = (Integer.parseInt(beginTime) <= nowtime) && ( | ||
54 | + Integer.parseInt(endTime) >= nowtime); | ||
55 | + return flag; | ||
56 | + } | ||
57 | + | ||
41 | /** | 58 | /** |
42 | * 检查开户时间 | 59 | * 检查开户时间 |
43 | * | 60 | * | ... | ... |
... | @@ -15,7 +15,9 @@ import org.springframework.stereotype.Service; | ... | @@ -15,7 +15,9 @@ import org.springframework.stereotype.Service; |
15 | import org.springframework.util.Assert; | 15 | import org.springframework.util.Assert; |
16 | 16 | ||
17 | import com.cjs.site.dao.pub.SysConfigDao; | 17 | import com.cjs.site.dao.pub.SysConfigDao; |
18 | +import com.cjs.site.dao.user.fund.FundRealDao; | ||
18 | import com.cjs.site.dao.user.fund.OtcEntrustUsefulDao; | 19 | import com.cjs.site.dao.user.fund.OtcEntrustUsefulDao; |
20 | +import com.cjs.site.dao.user.fund.UserKitingDao; | ||
19 | import com.cjs.site.dao.user.ration.RationNewFundDao; | 21 | import com.cjs.site.dao.user.ration.RationNewFundDao; |
20 | import com.cjs.site.model.pub.SysConfigInfo; | 22 | import com.cjs.site.model.pub.SysConfigInfo; |
21 | import com.cjs.site.model.user.account.UserInfo; | 23 | import com.cjs.site.model.user.account.UserInfo; |
... | @@ -44,6 +46,8 @@ public class FundBiz { | ... | @@ -44,6 +46,8 @@ public class FundBiz { |
44 | private RationNewFundDao rationNewFundDao; | 46 | private RationNewFundDao rationNewFundDao; |
45 | @Autowired | 47 | @Autowired |
46 | private OtcEntrustUsefulDao usefulDao; | 48 | private OtcEntrustUsefulDao usefulDao; |
49 | + @Autowired | ||
50 | + private FundRealDao fundRealDao; | ||
47 | 51 | ||
48 | /** | 52 | /** |
49 | * 余额查询 | 53 | * 余额查询 |
... | @@ -59,6 +63,13 @@ public class FundBiz { | ... | @@ -59,6 +63,13 @@ public class FundBiz { |
59 | log.info("用户[" + userId + "]资金余额:" + result); | 63 | log.info("用户[" + userId + "]资金余额:" + result); |
60 | return result.getData().get(0); | 64 | return result.getData().get(0); |
61 | } | 65 | } |
66 | + | ||
67 | + /** | ||
68 | + * 余额查询 | ||
69 | + */ | ||
70 | + public Map<String, Double> balanceSelf(String userId) { | ||
71 | + return fundRealDao.getUserBalance(userId); | ||
72 | + } | ||
62 | 73 | ||
63 | /** | 74 | /** |
64 | * 冻结用户资金 | 75 | * 冻结用户资金 |
... | @@ -280,6 +291,81 @@ public class FundBiz { | ... | @@ -280,6 +291,81 @@ public class FundBiz { |
280 | params.put("end_date", endDate); | 291 | params.put("end_date", endDate); |
281 | return funds; | 292 | return funds; |
282 | } | 293 | } |
294 | + | ||
295 | + | ||
296 | + public List<Map<String, Object>> fundRecordNew(Map<String, Object> params, UserInfo userInfo) | ||
297 | + { | ||
298 | + String startDate = StringUtil.castString(params.get("start_date")); | ||
299 | + String endDate = StringUtil.castString(params.get("end_date")); | ||
300 | + if (StringUtils.isBlank(startDate)) | ||
301 | + startDate = DateUtil.parseDate(new Date(), DateEnum.UNSIGNED_DATE); | ||
302 | + else { | ||
303 | + startDate = startDate.replace("-", ""); | ||
304 | + } | ||
305 | + params.put("start_date", startDate); | ||
306 | + if (StringUtils.isBlank(endDate)) | ||
307 | + endDate = DateUtil.parseDate(new Date(), DateEnum.UNSIGNED_DATE); | ||
308 | + else { | ||
309 | + endDate = endDate.replace("-", ""); | ||
310 | + } | ||
311 | + params.put("end_date", endDate); | ||
312 | + | ||
313 | + int businessFlag = 0; | ||
314 | + if (!StringUtil.isBlank(params.get("en_business_flag"))) { | ||
315 | + businessFlag = Integer.parseInt(params.get("en_business_flag").toString()); | ||
316 | + switch (businessFlag) { | ||
317 | + case 1: | ||
318 | + params.put("remark", "客户提现"); | ||
319 | + params.put("en_business_flag", "2516"); | ||
320 | + break; | ||
321 | + case 2: | ||
322 | + params.put("remark", "入金调增"); | ||
323 | + params.put("en_business_flag", "2515"); | ||
324 | + break; | ||
325 | + default: | ||
326 | + businessFlag = 0; | ||
327 | + } | ||
328 | + | ||
329 | + } | ||
330 | + | ||
331 | + params.put("fundAccount", ActionUtil.getUser().getFund_account()); | ||
332 | + List<Map<String, Object>> funds = this.fundRealDao.queryFundRecord(params); | ||
333 | + params.put("_total", Integer.valueOf(this.fundRealDao.queryFundRecordTotal(params))); | ||
334 | + | ||
335 | + for (Map map : funds) { | ||
336 | + map.put("PARENT_CODE", "2000"); | ||
337 | + SysConfigInfo sysConfigInfo = this.sysConfigDao.queryByCondition(map); | ||
338 | + map.put("BUSINESS_FLAG", sysConfigInfo.getSysValue()); | ||
339 | + if ("存管资金红冲".equals(map.get("BUSINESS_FLAG").toString())) { | ||
340 | + if (map.get("REMARK").toString().indexOf("客户提现") >= 0) | ||
341 | + map.put("BUSINESS_FLAG", "客户提现"); | ||
342 | + } | ||
343 | + else if (("存管资金蓝补".equals(map.get("BUSINESS_FLAG").toString())) && | ||
344 | + (map.get("REMARK").toString().indexOf("入金调增") >= 0)) { | ||
345 | + map.put("BUSINESS_FLAG", "客户入金"); | ||
346 | + } | ||
347 | + | ||
348 | + String initDate = DateUtil.parseDate( | ||
349 | + DateUtil.parseDate(map.get("INIT_DATE").toString(), DateEnum.UNSIGNED_DATE), | ||
350 | + DateEnum.DATE); | ||
351 | + | ||
352 | + map.put("CURR_DATE_TIME", initDate); | ||
353 | + } | ||
354 | + | ||
355 | + if (businessFlag != 0) { | ||
356 | + params.put("en_business_flag", Integer.valueOf(businessFlag)); | ||
357 | + } | ||
358 | + | ||
359 | + startDate = DateUtil.parseDate(DateUtil.parseDate(startDate, DateEnum.UNSIGNED_DATE), | ||
360 | + DateEnum.DATE); | ||
361 | + endDate = DateUtil.parseDate(DateUtil.parseDate(endDate, DateEnum.UNSIGNED_DATE), | ||
362 | + DateEnum.DATE); | ||
363 | + params.put("start_date", startDate); | ||
364 | + params.put("end_date", endDate); | ||
365 | + return funds; | ||
366 | + } | ||
367 | + | ||
368 | + | ||
283 | 369 | ||
284 | private List<Map<String, Object>> processFund(List<Map<String, Object>> funds) { | 370 | private List<Map<String, Object>> processFund(List<Map<String, Object>> funds) { |
285 | List<SysConfigInfo> configs = sysConfigDao.queryByParentCode("2000"); | 371 | List<SysConfigInfo> configs = sysConfigDao.queryByParentCode("2000"); | ... | ... |
... | @@ -60,14 +60,14 @@ public class UserKitingBiz { | ... | @@ -60,14 +60,14 @@ public class UserKitingBiz { |
60 | public String kiting(String subBranch, Double amount, String validCode, HttpSession session) { | 60 | public String kiting(String subBranch, Double amount, String validCode, HttpSession session) { |
61 | UserInfo userInfo = ActionUtil.getUser(); | 61 | UserInfo userInfo = ActionUtil.getUser(); |
62 | String userId = userInfo.getClient_id(); | 62 | String userId = userInfo.getClient_id(); |
63 | - if (!commonBiz.checkKitingTime()) { | 63 | + if (!this.commonBiz.checkTime(true, 10, 11)) { |
64 | - String beginTime = DateUtil.parseDate(DateUtil | 64 | + String beginTime = DateUtil.parseDate( |
65 | - .parseDate(sysParamDao.getParamValue("begin_time_fund"), DateEnum.UNSIGNED_TIME), | 65 | + DateUtil.parseDate(this.sysParamDao.getParamValue("begin_time_fund"), DateEnum.UNSIGNED_TIME), |
66 | - DateEnum.TIME); | 66 | + DateEnum.TIME); |
67 | String endTime = DateUtil.parseDate(DateUtil.parseDate( | 67 | String endTime = DateUtil.parseDate(DateUtil.parseDate( |
68 | - sysParamDao.getParamValue("end_time_fund"), DateEnum.UNSIGNED_TIME), DateEnum.TIME); | 68 | + this.sysParamDao.getParamValue("end_time_fund"), DateEnum.UNSIGNED_TIME), DateEnum.TIME); |
69 | return "请于交易日的" + beginTime + " - " + endTime + "进行提现操作。"; | 69 | return "请于交易日的" + beginTime + " - " + endTime + "进行提现操作。"; |
70 | - } | 70 | + } |
71 | //验证短信验证码 | 71 | //验证短信验证码 |
72 | if (!sendMessageBiz.compareValidCode(validCode, session)) { | 72 | if (!sendMessageBiz.compareValidCode(validCode, session)) { |
73 | return "短信验证码不正确"; | 73 | return "短信验证码不正确"; |
... | @@ -113,7 +113,8 @@ public class UserKitingBiz { | ... | @@ -113,7 +113,8 @@ public class UserKitingBiz { |
113 | T2Result result = null; | 113 | T2Result result = null; |
114 | String msg = "提现申请成功"; | 114 | String msg = "提现申请成功"; |
115 | try { | 115 | try { |
116 | - result = T2Util.request(params, "202101"); | 116 | + // result = T2Util.request(params, "202101"); |
117 | + result = this.ducureFund(userId, amount); | ||
117 | } finally { | 118 | } finally { |
118 | UserKitingInfo kitInfo = new UserKitingInfo(); | 119 | UserKitingInfo kitInfo = new UserKitingInfo(); |
119 | kitInfo.setUserId(userId); | 120 | kitInfo.setUserId(userId); |
... | @@ -121,7 +122,8 @@ public class UserKitingBiz { | ... | @@ -121,7 +122,8 @@ public class UserKitingBiz { |
121 | kitInfo.setMobile(bankInfo.get("MOBILE_TEL").toString()); | 122 | kitInfo.setMobile(bankInfo.get("MOBILE_TEL").toString()); |
122 | kitInfo.setBankName(bankInfo.get("OPEN_BANK_NAME").toString()); | 123 | kitInfo.setBankName(bankInfo.get("OPEN_BANK_NAME").toString()); |
123 | kitInfo.setBankNo(bankInfo.get("BANK_ACCOUNT").toString()); | 124 | kitInfo.setBankNo(bankInfo.get("BANK_ACCOUNT").toString()); |
124 | - kitInfo.setProvinceCity(bankInfo.get("PROVINCE_NAME") + bankInfo.get("CITY_NAME")); | 125 | + kitInfo.setProvince(bankInfo.get("PROVINCE_NAME")); |
126 | + kitInfo.setCity(bankInfo.get("CITY_NAME")); | ||
125 | kitInfo.setSubBranch(subBranch); | 127 | kitInfo.setSubBranch(subBranch); |
126 | amount *= -1; | 128 | amount *= -1; |
127 | kitInfo.setKitAmount(amount); | 129 | kitInfo.setKitAmount(amount); |
... | @@ -150,6 +152,13 @@ public class UserKitingBiz { | ... | @@ -150,6 +152,13 @@ public class UserKitingBiz { |
150 | return msg; | 152 | return msg; |
151 | } | 153 | } |
152 | 154 | ||
155 | + | ||
156 | + private T2Result ducureFund(String userId,Double amount){ | ||
157 | + T2Result result = new T2Result(); | ||
158 | + fundRealDao.freezeAmount(userId, Math.abs(amount)); | ||
159 | + result.setCode(0); | ||
160 | + return result; | ||
161 | + } | ||
153 | /** | 162 | /** |
154 | * 查询用户提现列表 | 163 | * 查询用户提现列表 |
155 | * @param params | 164 | * @param params | ... | ... |
This diff is collapsed. Click to expand it.
... | @@ -55,6 +55,21 @@ public class PositionBiz { | ... | @@ -55,6 +55,21 @@ public class PositionBiz { |
55 | return T2Util.request(params, "619008"); | 55 | return T2Util.request(params, "619008"); |
56 | } | 56 | } |
57 | 57 | ||
58 | + public T2Result positionSelf(UserInfo userInfo){ | ||
59 | + List<PickPackInfo> list = pickPackDao.queryUserPosition(userInfo.getClient_id()); | ||
60 | + List<Map<String, Object>> t2 = new ArrayList<Map<String, Object>>(); | ||
61 | + for(PickPackInfo info :list){ | ||
62 | + Map<String, Object> map = new HashMap<String, Object>(); | ||
63 | + map.put("otc_code",info.getOtcCode()); | ||
64 | + map.put("otc_name",info.getOtcName()); | ||
65 | + map.put("enable_amount",info.getCurrentAmount()); | ||
66 | + t2.add(map); | ||
67 | + } | ||
68 | + T2Result t = new T2Result(); | ||
69 | + t.setData(t2); | ||
70 | + return t; | ||
71 | + } | ||
72 | + | ||
58 | /**持仓列表(封装)*/ | 73 | /**持仓列表(封装)*/ |
59 | public List<Map<String, Object>> packPosition(UserInfo userInfo) { | 74 | public List<Map<String, Object>> packPosition(UserInfo userInfo) { |
60 | List<Map<String, Object>> positions = this.position(userInfo).getData(); | 75 | List<Map<String, Object>> positions = this.position(userInfo).getData(); | ... | ... |
1 | package com.cjs.site.dao.pub; | 1 | package com.cjs.site.dao.pub; |
2 | 2 | ||
3 | import java.util.List; | 3 | import java.util.List; |
4 | +import java.util.Map; | ||
4 | 5 | ||
5 | import org.springframework.stereotype.Repository; | 6 | import org.springframework.stereotype.Repository; |
6 | 7 | ||
... | @@ -19,4 +20,6 @@ public interface SysConfigDao { | ... | @@ -19,4 +20,6 @@ public interface SysConfigDao { |
19 | 20 | ||
20 | SysConfigInfo queryBySysKey(String sysKey); | 21 | SysConfigInfo queryBySysKey(String sysKey); |
21 | 22 | ||
23 | + public SysConfigInfo queryByCondition(Map<String, Object> paramMap); | ||
24 | + | ||
22 | } | 25 | } | ... | ... |
... | @@ -15,4 +15,6 @@ public interface SysParamValueDao { | ... | @@ -15,4 +15,6 @@ public interface SysParamValueDao { |
15 | String getParamValue(String paramName); | 15 | String getParamValue(String paramName); |
16 | 16 | ||
17 | Date getSysDate(); | 17 | Date getSysDate(); |
18 | + | ||
19 | + public String getValueById(int paramInt); | ||
18 | } | 20 | } | ... | ... |
1 | package com.cjs.site.dao.user.fund; | 1 | package com.cjs.site.dao.user.fund; |
2 | 2 | ||
3 | +import java.util.List; | ||
3 | import java.util.Map; | 4 | import java.util.Map; |
4 | 5 | ||
6 | +import org.apache.ibatis.annotations.Param; | ||
5 | import org.springframework.stereotype.Repository; | 7 | import org.springframework.stereotype.Repository; |
6 | 8 | ||
7 | import com.cjs.site.util.db.OracleDao; | 9 | import com.cjs.site.util.db.OracleDao; |
... | @@ -17,5 +19,15 @@ public interface FundRealDao extends OracleDao { | ... | @@ -17,5 +19,15 @@ public interface FundRealDao extends OracleDao { |
17 | 19 | ||
18 | /**查询指定客户资金*/ | 20 | /**查询指定客户资金*/ |
19 | Map<String, Object> queryByUserId(String userId); | 21 | Map<String, Object> queryByUserId(String userId); |
22 | + | ||
23 | + | ||
24 | + Map<String,Double> getUserBalance(String userId); | ||
25 | + | ||
26 | + | ||
27 | + void freezeAmount(@Param("userId")String userId,@Param("amount")Double amount); | ||
28 | + | ||
29 | + public List<Map<String, Object>> queryFundRecord(Map<String, Object> paramMap); | ||
30 | + | ||
31 | + public int queryFundRecordTotal(Map<String, Object> paramMap); | ||
20 | 32 | ||
21 | } | 33 | } | ... | ... |
1 | package com.cjs.site.dao.user.pick; | 1 | package com.cjs.site.dao.user.pick; |
2 | 2 | ||
3 | import java.util.List; | 3 | import java.util.List; |
4 | +import java.util.Map; | ||
4 | 5 | ||
6 | +import com.cjs.site.model.user.pick.OutpropApplyInfo; | ||
7 | +import org.apache.ibatis.annotations.Param; | ||
5 | import org.springframework.stereotype.Repository; | 8 | import org.springframework.stereotype.Repository; |
6 | 9 | ||
7 | import com.cjs.site.model.user.pick.PickPackInfo; | 10 | import com.cjs.site.model.user.pick.PickPackInfo; |
... | @@ -20,4 +23,14 @@ public interface PickPackDao extends OracleDao { | ... | @@ -20,4 +23,14 @@ public interface PickPackDao extends OracleDao { |
20 | List<PickPackInfo> queryAll(); | 23 | List<PickPackInfo> queryAll(); |
21 | 24 | ||
22 | PickPackInfo queryById(Integer id); | 25 | PickPackInfo queryById(Integer id); |
26 | + | ||
27 | + List<PickPackInfo> queryUserPosition(String userId); | ||
28 | + | ||
29 | + Map<String,Object> queryUserFundAccount(String userId); | ||
30 | + | ||
31 | + void ducueUserFundAmount(@Param("money") Double money,@Param("userId") String userId); | ||
32 | + | ||
33 | + void ducueUserInventory(@Param("amount") Integer amount,@Param("otcCode") String otcCode,@Param("userId") String userId); | ||
34 | + | ||
35 | + void insertPick(Map<String,Object> map); | ||
23 | } | 36 | } | ... | ... |
... | @@ -20,7 +20,8 @@ public class UserKitingInfo extends BaseInfo { | ... | @@ -20,7 +20,8 @@ public class UserKitingInfo extends BaseInfo { |
20 | private String bankName; | 20 | private String bankName; |
21 | private String bankNo; | 21 | private String bankNo; |
22 | private String subBranch; //支行名称 | 22 | private String subBranch; //支行名称 |
23 | - private String provinceCity; | 23 | + private String province; |
24 | + private String city; | ||
24 | private Double kitAmount; //提现金额 | 25 | private Double kitAmount; //提现金额 |
25 | private Double kitFare; | 26 | private Double kitFare; |
26 | private Double payableAmount; | 27 | private Double payableAmount; |
... | @@ -169,15 +170,24 @@ public class UserKitingInfo extends BaseInfo { | ... | @@ -169,15 +170,24 @@ public class UserKitingInfo extends BaseInfo { |
169 | this.refuseBy = refuseBy; | 170 | this.refuseBy = refuseBy; |
170 | } | 171 | } |
171 | 172 | ||
172 | - public String getProvinceCity() { | ||
173 | - return provinceCity; | ||
174 | - } | ||
175 | 173 | ||
176 | - public void setProvinceCity(String provinceCity) { | 174 | + public String getProvince() { |
177 | - this.provinceCity = provinceCity; | 175 | + return province; |
178 | - } | 176 | + } |
177 | + | ||
178 | + public void setProvince(String province) { | ||
179 | + this.province = province; | ||
180 | + } | ||
181 | + | ||
182 | + public String getCity() { | ||
183 | + return city; | ||
184 | + } | ||
185 | + | ||
186 | + public void setCity(String city) { | ||
187 | + this.city = city; | ||
188 | + } | ||
179 | 189 | ||
180 | - public String getSubBranch() { | 190 | + public String getSubBranch() { |
181 | return subBranch; | 191 | return subBranch; |
182 | } | 192 | } |
183 | 193 | ... | ... |
... | @@ -23,6 +23,20 @@ public class PickPackInfo extends BaseInfo { | ... | @@ -23,6 +23,20 @@ public class PickPackInfo extends BaseInfo { |
23 | private String createTime; //创建时间 | 23 | private String createTime; //创建时间 |
24 | private String createBy; //创建人 | 24 | private String createBy; //创建人 |
25 | 25 | ||
26 | + private int currentAmount; | ||
27 | + | ||
28 | + public static long getSerialVersionUID() { | ||
29 | + return serialVersionUID; | ||
30 | + } | ||
31 | + | ||
32 | + public int getCurrentAmount() { | ||
33 | + return currentAmount; | ||
34 | + } | ||
35 | + | ||
36 | + public void setCurrentAmount(int currentAmount) { | ||
37 | + this.currentAmount = currentAmount; | ||
38 | + } | ||
39 | + | ||
26 | public Integer getId() { | 40 | public Integer getId() { |
27 | return id; | 41 | return id; |
28 | } | 42 | } | ... | ... |
... | @@ -2,6 +2,7 @@ package com.cjs.site.util.web; | ... | @@ -2,6 +2,7 @@ package com.cjs.site.util.web; |
2 | 2 | ||
3 | import java.io.IOException; | 3 | import java.io.IOException; |
4 | import java.security.SecureRandom; | 4 | import java.security.SecureRandom; |
5 | +import java.util.Random; | ||
5 | 6 | ||
6 | import javax.crypto.Cipher; | 7 | import javax.crypto.Cipher; |
7 | import javax.crypto.SecretKey; | 8 | import javax.crypto.SecretKey; |
... | @@ -9,6 +10,7 @@ import javax.crypto.SecretKeyFactory; | ... | @@ -9,6 +10,7 @@ import javax.crypto.SecretKeyFactory; |
9 | import javax.crypto.spec.DESKeySpec; | 10 | import javax.crypto.spec.DESKeySpec; |
10 | 11 | ||
11 | import org.apache.commons.codec.digest.DigestUtils; | 12 | import org.apache.commons.codec.digest.DigestUtils; |
13 | +import org.apache.commons.lang3.RandomUtils; | ||
12 | 14 | ||
13 | import sun.misc.BASE64Decoder; | 15 | import sun.misc.BASE64Decoder; |
14 | import sun.misc.BASE64Encoder; | 16 | import sun.misc.BASE64Encoder; |
... | @@ -26,10 +28,13 @@ public class DesUtil { | ... | @@ -26,10 +28,13 @@ public class DesUtil { |
26 | 28 | ||
27 | public static void main(String[] args) throws Exception { | 29 | public static void main(String[] args) throws Exception { |
28 | //String data = "{uid: \"80018500\", pwd: \"111111\"}"; | 30 | //String data = "{uid: \"80018500\", pwd: \"111111\"}"; |
29 | - String data = "111111"; | 31 | + String data = "v9OZqooWMhI="; |
30 | String key = "ZHAOYN_WEB_UP"; | 32 | String key = "ZHAOYN_WEB_UP"; |
31 | - System.err.println(encrypt(data, key)); | 33 | + System.err.println(decrypt(data, key)); |
32 | System.err.println(decrypt(encrypt(data, key), key)); | 34 | System.err.println(decrypt(encrypt(data, key), key)); |
35 | + Random ran=new Random(); | ||
36 | + long a=RandomUtils.nextLong(1, 10); | ||
37 | + System.out.println(System.currentTimeMillis()); | ||
33 | } | 38 | } |
34 | 39 | ||
35 | /** | 40 | /** | ... | ... |
1 | -env=test | 1 | +env=prod |
2 | 2 | ||
3 | #===============================开发环境==================================== | 3 | #===============================开发环境==================================== |
4 | #jdbc | 4 | #jdbc |
... | @@ -79,6 +79,7 @@ prod.user.username=80018609 | ... | @@ -79,6 +79,7 @@ prod.user.username=80018609 |
79 | prod.user.password=111111 | 79 | prod.user.password=111111 |
80 | prod.host=http://www.zhao.com/ | 80 | prod.host=http://www.zhao.com/ |
81 | prod.redis.host=10.4.35.194 | 81 | prod.redis.host=10.4.35.194 |
82 | +prod.redis.port=6379 | ||
82 | #汇付接口参数 | 83 | #汇付接口参数 |
83 | prod.pnr.operId=873497 | 84 | prod.pnr.operId=873497 |
84 | prod.pnr.pbKey=PgPubk.key | 85 | prod.pnr.pbKey=PgPubk.key | ... | ... |
... | @@ -55,7 +55,7 @@ | ... | @@ -55,7 +55,7 @@ |
55 | </AsyncLogger> | 55 | </AsyncLogger> |
56 | 56 | ||
57 | <!-- 全局配置,默认所有的Logger都继承此配置 --> | 57 | <!-- 全局配置,默认所有的Logger都继承此配置 --> |
58 | - <AsyncRoot level="info"> | 58 | + <AsyncRoot level="debug"> |
59 | <AppenderRef ref="console" /> | 59 | <AppenderRef ref="console" /> |
60 | <AppenderRef ref="rollingInfoFile" /> | 60 | <AppenderRef ref="rollingInfoFile" /> |
61 | <AppenderRef ref="rollingErrorFile" /> | 61 | <AppenderRef ref="rollingErrorFile" /> | ... | ... |
... | @@ -50,4 +50,13 @@ | ... | @@ -50,4 +50,13 @@ |
50 | AND INSTR(remark, #{remark}) > 0 | 50 | AND INSTR(remark, #{remark}) > 0 |
51 | </if> | 51 | </if> |
52 | </select> | 52 | </select> |
53 | + | ||
54 | + | ||
55 | + <select id="getUserBalance" resultType="java.util.HashMap"> | ||
56 | + select current_balance from hs_fund.fundreal a where a.client_id =#{userId} | ||
57 | + </select> | ||
58 | + | ||
59 | + <update id="freezeAmount"> | ||
60 | + update hs_fund.fundreal set current_balance =current_balance-#{amount},enable_balance=enable_balance-#{amount} ,frozen_balance=#{amount} where client_id = #{userId} | ||
61 | + </update> | ||
53 | </mapper> | 62 | </mapper> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -21,5 +21,43 @@ | ... | @@ -21,5 +21,43 @@ |
21 | FROM HS_ASSET.PICK_PACK | 21 | FROM HS_ASSET.PICK_PACK |
22 | WHERE ID = #{id} | 22 | WHERE ID = #{id} |
23 | </select> | 23 | </select> |
24 | - | 24 | + |
25 | + | ||
26 | + <select id="queryUserPosition" parameterType="string" resultType="PickPackInfo"> | ||
27 | + select | ||
28 | + a.otc_code as otcCode , | ||
29 | + d.otc_name AS otcName , | ||
30 | + a.current_amount as currentAmount | ||
31 | + from hs_otc.otcstockreal a, hs_asset.clientinfo b, hs_asset.client c,hs_otc.otccode d | ||
32 | + where a.client_id = b.client_id | ||
33 | + and a.client_id = c.client_id | ||
34 | + and a.otc_code=d.otc_code | ||
35 | + and a.client_id = #{userId} | ||
36 | + </select> | ||
37 | + | ||
38 | + | ||
39 | + <select id="queryUserFundAccount" resultType="java.util.HashMap" parameterType="string" > | ||
40 | + select current_balance from hs_fund.fundreal a where a.client_id =#{userId} | ||
41 | + </select> | ||
42 | + | ||
43 | + <update id="ducueUserFundAmount"> | ||
44 | + update hs_fund.fundreal set current_balance = current_balance-#{money} where client_id =#{userId} | ||
45 | + </update> | ||
46 | + | ||
47 | + <update id="ducueUserInventory"> | ||
48 | + update hs_otc.otcstockreal set current_amount = current_amount-#{amount} where client_id =#{userId} and otc_code=#{otcCode} | ||
49 | + </update> | ||
50 | + | ||
51 | + <insert id="insertPick" parameterType="java.util.HashMap"> | ||
52 | + insert into HS_ASSET.OUTPROPAPPLY( | ||
53 | + OTC_CODE, OTC_NAME, OCCUR_AMOUNT, PICKING_DATE, | ||
54 | + PHONE_CODE, PICKING_ADDRESS,REMARK, OP_STATION, | ||
55 | + SDCPROPAPPLY_STATUS, EXPRESS_ADRESS, | ||
56 | + INIT_DATE,PICKING_NAME,POSITION_STR | ||
57 | + ) values( | ||
58 | + #{otcCode},#{otcName},#{occurAmount},#{pickDate}, | ||
59 | + #{phone,jdbcType=VARCHAR},#{pikingAddress,jdbcType=VARCHAR},'临时解决',#{opStation}, | ||
60 | + 0,#{address,jdbcType=VARCHAR},#{initDate},#{pickName,jdbcType=VARCHAR},#{postionStr,jdbcType=VARCHAR} | ||
61 | + ) | ||
62 | + </insert> | ||
25 | </mapper> | 63 | </mapper> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -69,8 +69,8 @@ var Position = function($) { | ... | @@ -69,8 +69,8 @@ var Position = function($) { |
69 | $("#btnNormalPick").val("确认提货") | 69 | $("#btnNormalPick").val("确认提货") |
70 | }else{ | 70 | }else{ |
71 | for (var i = 0; i < occurAmounts.length; i++) { | 71 | for (var i = 0; i < occurAmounts.length; i++) { |
72 | - $(occurAmounts[i]).val('') | 72 | + //$(occurAmounts[i]).val('') |
73 | - $(occurAmounts[i]).removeAttr("disabled") | 73 | + //$(occurAmounts[i]).removeAttr("disabled") |
74 | } | 74 | } |
75 | $("#aaetip1").css('display','none') | 75 | $("#aaetip1").css('display','none') |
76 | $("#aaetip2").css('display','none') | 76 | $("#aaetip2").css('display','none') | ... | ... |
... | @@ -9,7 +9,7 @@ | ... | @@ -9,7 +9,7 @@ |
9 | <p class="title">合作企业</p> | 9 | <p class="title">合作企业</p> |
10 | <p><a href="http://www.zhaoonline.com/">赵涌在线</a> <a href="http://www.hosane.com/">泓盛</a> | 10 | <p><a href="http://www.zhaoonline.com/">赵涌在线</a> <a href="http://www.hosane.com/">泓盛</a> |
11 | <a href="http://www.ytgrading.com/">源泰评级</a><!-- <a href="http://www.zbd8.com/">召宝贷</a></p> --> | 11 | <a href="http://www.ytgrading.com/">源泰评级</a><!-- <a href="http://www.zbd8.com/">召宝贷</a></p> --> |
12 | - <p><a href="/trade/article?id=87&cid=30" class="title">关于我们</a> <a href="/trade/article?id=108&cid=31" class="title">联系我们</a> | 12 | + <p><!-- <a href="/trade/article?id=87&cid=30" class="title">关于我们</a> --><a href="/trade/article?id=108&cid=31" class="title">联系我们</a> |
13 | <!-- <a href="/trade/article?id=110&cid=32" class="title">诚聘英才</a> --><a href="/trade/article?id=89&cid=33" class="title">法律声明</a></p> | 13 | <!-- <a href="/trade/article?id=110&cid=32" class="title">诚聘英才</a> --><a href="/trade/article?id=89&cid=33" class="title">法律声明</a></p> |
14 | <!-- <p><a href="http://www.zhongyoubi.com/">中邮币</a></p> --> | 14 | <!-- <p><a href="http://www.zhongyoubi.com/">中邮币</a></p> --> |
15 | </div> | 15 | </div> | ... | ... |
... | @@ -82,12 +82,12 @@ | ... | @@ -82,12 +82,12 @@ |
82 | </c:if> | 82 | </c:if> |
83 | <td> | 83 | <td> |
84 | <div> | 84 | <div> |
85 | - <a href="/ec/entrust/detail/${entrust.SDC_CODE}"> | 85 | + <a href="#"> |
86 | <img src="${entrust.IMAGE }" height="95" width="140" /> | 86 | <img src="${entrust.IMAGE }" height="95" width="140" /> |
87 | </a> | 87 | </a> |
88 | </div> | 88 | </div> |
89 | <p style="text-align: left;"> | 89 | <p style="text-align: left;"> |
90 | - <a href="/ec/entrust/detail/${entrust.SDC_CODE}">${entrust.SDC_NAME }</a> | 90 | + <a href="#">${entrust.SDC_NAME }</a> |
91 | <span style="float: right;"> | 91 | <span style="float: right;"> |
92 | <c:if test="${entrust.PRICE == 0 }">--</c:if> | 92 | <c:if test="${entrust.PRICE == 0 }">--</c:if> |
93 | <c:if test="${entrust.PRICE > 0 }"> | 93 | <c:if test="${entrust.PRICE > 0 }"> | ... | ... |
... | @@ -78,7 +78,7 @@ | ... | @@ -78,7 +78,7 @@ |
78 | 78 | ||
79 | <form id="kitingForm" action="${ctx }/user/kiting" method="post"> | 79 | <form id="kitingForm" action="${ctx }/user/kiting" method="post"> |
80 | <p> | 80 | <p> |
81 | - <label>可用余额:</label> <span><fmt:formatNumber type="number" maxFractionDigits="2" minFractionDigits="2" value="${balance.current_balance }" /> 元</span> | 81 | + <label>可用余额:</label> <span><fmt:formatNumber type="number" maxFractionDigits="2" minFractionDigits="2" value="${balance.CURRENT_BALANCE }" /> 元</span> |
82 | </p> | 82 | </p> |
83 | <p> | 83 | <p> |
84 | <label>银行账户:</label> <span>${bank.BANK_ACCOUNT }(${bank.OPEN_BANK_NAME })${bank.CLIENT_NAME }</span> | 84 | <label>银行账户:</label> <span>${bank.BANK_ACCOUNT }(${bank.OPEN_BANK_NAME })${bank.CLIENT_NAME }</span> |
... | @@ -91,7 +91,7 @@ | ... | @@ -91,7 +91,7 @@ |
91 | 91 | ||
92 | <p> | 92 | <p> |
93 | <label>提现金额:</label> | 93 | <label>提现金额:</label> |
94 | - <input type="text" name="amount" placeholder="单笔提现不得少于10元" id="txtAmount" maxlength="8" />元 | 94 | + <input type="text" name="amount" placeholder="单笔提现不得少于10元" id="txtAmount" maxlength="8" value="${balance.CURRENT_BALANCE }" readonly="readonly"/>元 |
95 | </p> | 95 | </p> |
96 | 96 | ||
97 | <p> | 97 | <p> | ... | ... |
... | @@ -59,10 +59,10 @@ | ... | @@ -59,10 +59,10 @@ |
59 | <td class="left-font">${position.otc_name }</td> | 59 | <td class="left-font">${position.otc_name }</td> |
60 | <td><fmt:formatNumber pattern="#####" value="${position.enable_amount }" /></td> | 60 | <td><fmt:formatNumber pattern="#####" value="${position.enable_amount }" /></td> |
61 | <td> | 61 | <td> |
62 | - <input type="number" name="occurAmount" min="1" maxlength="5" | 62 | + <input type="number" name="occurAmount" min="1" maxlength="5" value="${position.enable_amount}" style="display: none" |
63 | - onkeyup="this.value=this.value.replace(/\D/g,'')" | 63 | + onkeyup="this.value=this.value.replace(/\D/g,'')" |
64 | onafterpaste="this.value=this.value.replace(/\D/g,'')" /> | 64 | onafterpaste="this.value=this.value.replace(/\D/g,'')" /> |
65 | - <span style="display: none;">${position.enable_amount }</span> | 65 | + <span>${position.enable_amount }</span> |
66 | </td> | 66 | </td> |
67 | </tr> | 67 | </tr> |
68 | </c:if> | 68 | </c:if> | ... | ... |
-
Please register or login to post a comment